package com.csg.ioms.fallback;

import com.csg.ioms.enums.CommonStateEnums;
import com.csg.ioms.result.Result;
import com.csg.ioms.service.SchedulerService;

/**
 * <p></p>
 *
 * @author George Chan
 * @version 1.0
 * @date 2020/3/26 13:10
 * @since JDK 1.8
 */
public class SchedulerServiceFallback implements SchedulerService {
    private Throwable throwable;

    public SchedulerServiceFallback(Throwable throwable) {
        this.throwable = throwable;
    }

    @Override
    public Object remote() {
        return new Result(false, CommonStateEnums.ERROR.getCode(), CommonStateEnums.ERROR.getMessage(), "触发熔断。。。");
    }
}
